package com.me.jingdongshop.ui.holder;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.me.common.ui.BaseAdapterLV;
import com.me.common.ui.BaseHolderLV;
import com.me.jingdongshop.R;

/**
 * Created by Administrator on 2017/5/7.
 * 我的订单详情页----十分钟内订单和十分钟前订单
 */

public class MyIndentItemHolder extends BaseHolderLV<String> {
    private TextView tvSettop;
    private TextView tvDelete;
    private TextView tvIndentId;
    private LinearLayout llIndentCenter;
    private TextView tvIndentMoney;
    private TextView tvIndentStatus;
    private TextView tvIndentTime;
    public MyIndentItemHolder(Context context, ViewGroup parent, BaseAdapterLV<String> adapter, int position, String bean) {
        super(context, parent, adapter, position, bean);
    }

    @Override
    public View onCreateView(Context context, ViewGroup parent) {
        View inflate = LayoutInflater.from(context).inflate(R.layout.my_indent_item,parent,false);

        //置顶和删除
        tvSettop = (TextView) inflate.findViewById(R.id.tv_settop);
        tvDelete = (TextView) inflate.findViewById(R.id.tv_delete);
        //信息
        tvIndentId = (TextView) inflate.findViewById(R.id.tv_indent_id);
        llIndentCenter = (LinearLayout) inflate.findViewById(R.id.ll_indent_center);
        tvIndentMoney = (TextView) inflate.findViewById(R.id.tv_indent_money);
        tvIndentStatus = (TextView) inflate.findViewById(R.id.tv_indent_status);
        tvIndentTime = (TextView) inflate.findViewById(R.id.tv_indent_time);

        return inflate;
    }

    @Override
    protected void onRefreshView(String bean, int position) {
        tvIndentId.setText("订单编号：20170507");
        tvIndentMoney.setText("订单总额：￥66.6");
        tvIndentStatus.setText("状态：未确定");
        tvIndentTime.setText("2017/05/07 10:13:33");

    }
}
